<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>媒体类型</title>
    <style>
      h1 {
        height: 400px;
        width: 600px;
        background-image: linear-gradient(45deg,red,yellow,green);
        line-height: 400px;
        text-align: center;
        margin: 0 auto;
        font-size: 100px;
        color: white;
        text-shadow: 0 0 20px black;
      }
      /* 在打印机机上去掉 背景 */
      @media  print {
         h1 {
           background: transparent;
         }
      }
      @media screen {
        h1 {
          color: #01A6DE;
        }
      }
    </style>
</head>
<body>
  <h1>新年快乐</h1>
</body>
</html>